package ru.silviasaint.fridge.client.events;

import com.google.gwt.event.shared.GwtEvent;

/**
 * Created by Dmitry.
 * User: jetblack20
 * Date: 4/7/12
 * Time: 1:31 PM
 */
public class PageChangeEvent extends GwtEvent<PageChangeEventHandler> {
    public static Type<PageChangeEventHandler> TYPE = new Type<PageChangeEventHandler>();
    private int page;

    public Type<PageChangeEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(PageChangeEventHandler handler) {
        handler.onPageChange(this);
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }
}
